#pragma once
#include <renderer/scene.h>
#include <renderer/material.h>

BEGIN_NAMESPACE_OXGE



class ViewPort;
class SceneNode;



class Grid
{
public:
	Grid(){
		m_center = Point3::ZERO;
		m_dDimXYZ = Vector3(100,100,0);
		m_dStripXYZ = Vector3(10,10,10);
	}
public:
	Point3 m_center;
	Vector3 m_dDimXYZ;
	Vector3 m_dStripXYZ;	
};

class ViewPort
{
public:
	ViewPort(int x, int y, int width, int height ){
		m_x = x; m_y = y; m_width = width; m_height = height; 
	}
public:
	int m_x;
	int m_y;
	int m_width;
	int m_height;
	 
};

class RENDERER_TRANSFER RendererSetting
{
public:

};

class RENDERER_TRANSFER Renderer : public oxgeClass<Renderer>
{
public:
	

	virtual void StartRender()=0;
	virtual void EndRender() =0;
	virtual void Render(SceneNode* pScene, const ViewPort& ) =0;

};


class RENDERER_TRANSFER RenderDevice : public oxgeClass<RenderDevice>
{
public:
	virtual Renderer * CreateGLRenderer(const RendererSetting& ) = 0;

	void AddRenderer(Renderer* pRenderer);

	std::vector<Renderer::RefPtr> m_vRenderers;

	Renderer* GetRenderer(int idx);

};


END_NAMESPACE_OXGE